package ren.steve.model.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.*;

@Data
public class BaseEntity implements Serializable {

    @ApiModelProperty(value = "ID")
    @TableId(type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    private String gmtCreate;

    @ApiModelProperty(value = "跟新时间")
    @TableField("gmt_update")
    private String gmtUpdate;

    // @TableLogic("999")  // 逻辑删除功能 只能识别 0 和 1 如果非0和1参数就自己写吧
    @ApiModelProperty(value = "状态(000:启用,001:新增,002:禁用,003:异常,004:保留,005:登录成功,006:登录失败,007:密码错误,008:用户名错误,009:操作正常,010:操作异常,999:逻辑删除)")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "国际化")
    @TableField(exist = false)
    private List<Language> language = new ArrayList<>();

    @ApiModelProperty(value = "额外的属性")
    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
